<%@ page import="com.example.oa.Employee" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 23333
  Date: 2023/3/11
  Time: 19:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>员工详情 页面</title>
</head>
<%--<%--%>
<%--    Employee employee = (Employee) session.getAttribute("employee");--%>
<%--%>--%>
<body>
<h1>员工详情修改页面</h1>
<form action="/OA" method="post">
    <input type="hidden" name="id" value="${sessionScope.employee.id}">
    <br>
    <label>ID：
        <input type="number" name="ID" placeholder="ID" value="${sessionScope.employee.id}" disabled="disabled">
    </label>
    <br>
    <label>姓名：
        <input type="text" name="name" placeholder="NAME" value="${sessionScope.employee.name}" disabled="disabled">
    </label>
    <br>
    <label>密码：
        <input type="text" name="passsword" placeholder="PASSWORD" value="${sessionScope.employee.password}" disabled="disabled">
    </label>
    <br>
    <label>年龄：
        <input type="number" name="age" placeholder="AGE" value="${sessionScope.employee.age}" disabled="disabled">
    </label>
    <br>
    <label>
        Gender:
        ${sessionScope.employee.gender}
<%--        <input type="radio" name="gender" value="M" <%=employee.getGender().equals("M") ? "checked" : ""%>>Male--%>
<%--        <input type="radio" name="gender" value="F" <%=employee.getGender().equals("M")?"":"checked"%>>Female--%>
    </label>
    <br>
    <label>ROLE：
        <input type="number" name="role" placeholder="ROLE" value="${sessionScope.employee.role}" disabled="disabled">
    </label>
</form>
<p style="color: #FF0000">
    <%
        String message = (String) request.getAttribute("message");
        if (message != null){
            out.print(message);
        }
    %>
</p>
</body>
</html>
